#include <string>
using namespace std;
class Solution
{
public:
    string modifyString(string s)
    {
        for (int i = 0; i < s.size(); ++i)
        {
            if (s[i] == '?')
            {
                char a = i - 1 >= 0 ? s[i - 1] : -1;
                int b = -1;
                if (i + 1 < s.size())
                    b = s[i + 1];
                char c = 0;
                for (c = 'a'; c <= 'z'; ++c)
                {
                    if ((a == -1 || c != a) && (b == -1 || c != b))
                        break;
                }
                s[i] = c;
            }
        }
        return s;
    }
};